package com.hnevc.caoliuye;

import java.util.Arrays;
import java.util.Scanner;

public class Homework {
    public static void main(String[] args) {
        int n,k;
        Scanner scanner = new Scanner(System.in);
        n=scanner.nextInt();
        k=scanner.nextInt();
        int[] a =new  int[1010];
        Arrays.fill(a,0);
        for (int i=1;i<k;i++){
            for (int j=1;j<n;j++){
                if (j%i==0){
                    if (a[j]==0){
                        a[j]=1;
                    }
                    else {
                        a[j]=0;
                    }
                }
            }
        }
        for (int i =1;i<n;i++){
            if(a[i]==1){
                System.out.println(i+"");
            }
        }
    }
}
